package com.yao.club.entity.dto;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.math.BigDecimal;
import java.time.Instant;

@Getter
@Setter
@Entity
@Table(name = "goods_sku")
public class GoodsSku {
    @Id
    @Column(name = "id", nullable = false)
    private Long id;

    @Column(name = "goods_id", nullable = false)
    private Long goodsId;

    @Column(name = "sku_code", nullable = false, length = 64)
    private String skuCode;

    @Column(name = "sku_name", nullable = false)
    private String skuName;

    @Lob
    @Column(name = "attrs")
    private String attrs;

    @Column(name = "market_price", precision = 18, scale = 2)
    private BigDecimal marketPrice;

    @Column(name = "purchase_price", precision = 18, scale = 2)
    private BigDecimal purchasePrice;

    @Column(name = "deposit", precision = 18, scale = 2)
    private BigDecimal deposit;

    @Lob
    @Column(name = "goods_desc")
    private String goodsDesc;

    @Column(name = "sku_img_url")
    private String skuImgUrl;

    @Column(name = "stocks")
    private Integer stocks;

    @Column(name = "limit_number")
    private Integer limitNumber;

    @Column(name = "limit_number_c")
    private Integer limitNumberC;

    @Column(name = "origin_name")
    private String originName;

    @Column(name = "referrals")
    private Boolean referrals;

    @Column(name = "sale_status")
    private Boolean saleStatus;

    @Column(name = "sale_message")
    private String saleMessage;

    @Column(name = "create_time")
    private Instant createTime;

    @Column(name = "update_time")
    private Instant updateTime;

}